﻿using NUnit.Framework;
using PoliticalClassifier.Domain;
using PoliticalClassifier.Support;

namespace PoliticalClassifier.Framework.Test
{
    [TestFixture]
    public class WeightManagerTest
    {
        [Test]
        public void WeightManagerAddRemoveTest()
        {
            IWeightManager manager = new WeightManager();
            Assert.AreEqual(0, manager.Count);

            IWeightAttribute weight1 = new WeightAttribute("Mil", new Point2D(10,20));
            manager.AddWeight(weight1);
            Assert.AreEqual(1, manager.Count);

            IWeightAttribute weight2 = new WeightAttribute("Age", new Point2D(1, 2));
            manager.AddWeight(weight2);
            Assert.AreEqual(2, manager.Count);

            manager.RemoveWeight(1);
            Assert.AreEqual(1, manager.Count);

            manager.RemoveWeight(0);
            Assert.AreEqual(0, manager.Count);
        }
    }
}
